package com.partners.service.Impl;

import com.partners.dao.basic.ConfigDao;
import com.partners.dao.bo.ConfigDO;
import com.partners.service.ConfigService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

/**
 *
 * @author liangyongle
 * @date 2019-01-02
 */
@Service
public class ConfigServiceImpl implements ConfigService {


    @Resource
    private ConfigDao configDao;
    /**
     * 获取配置信息
     * @param
     * @return Object
     */
    @Override
    public ConfigDO getConfigDetail() {
        Integer id = 1;
        ConfigDO configDO = configDao.selectByPrimaryKey(id);
        return configDO;
    }


    /**
     * 编辑设置
     * @param configDO ConfigDO
     * @return Object
     */
    @Override
    @Transactional
    public Integer editConfig(ConfigDO configDO) {
        Integer result = configDao.updateByPrimaryKeySelective(configDO);
        return result;
    }
}
